// 用于操作数据库
let query = require('../db/index')
let sql = require('./category_sql')

// 查询全部文章流量数据 TODO
exports.getall = function (callback) {
    query(sql.selectAll, function (err, results, fields) {
        if (err) {
            console.log('数据查询失败');
            throw err;
        }
        callback(results);
    });
}
